home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_leafnode.idb / usr / freeware / src / leafnode / patches.z / patches
Encoding:
Text File  |  1999-04-16  |  5.4 KB  |  201 lines

  1. *** ./Makefile.in    Sun Feb 14 04:18:33 1999
  2. --- ../leafnode-1.9/./Makefile.in    Wed Feb 17 14:19:34 1999
  3. ***************
  4. *** 24,31 ****
  5.   BINDIR = $(PREFIX_USR)/sbin
  6.   MANDIR = $(PREFIX_USR)/man
  7.   SPOOLDIR = $(PREFIX_VAR)/spool/news
  8. ! LIBDIR   = /usr/lib/leafnode
  9. ! LOCKFILE = "/var/lock/news/fetch.lck"
  10.   
  11.   # RPM crap
  12.   RPM = @RPM@
  13. --- 24,31 ----
  14.   BINDIR = $(PREFIX_USR)/sbin
  15.   MANDIR = $(PREFIX_USR)/man
  16.   SPOOLDIR = $(PREFIX_VAR)/spool/news
  17. ! LIBDIR   = $(PREFIX_USR)/lib/leafnode
  18. ! LOCKFILE = $(SPOOLDIR)/fetch.lck
  19.   
  20.   # RPM crap
  21.   RPM = @RPM@
  22. *** ./fetch.c    Sun Feb 14 04:18:33 1999
  23. --- ../leafnode-1.9/./fetch.c    Mon Mar  1 11:52:13 1999
  24. ***************
  25. *** 21,26 ****
  26. --- 21,27 ----
  27.   #ifdef BSD
  28.   #include <sys/errno.h>
  29.   #endif
  30.   #include <ctype.h>
  31.   #include <dirent.h>
  32.   #include <fcntl.h>
  33. ***************
  34. *** 834,844 ****
  35.           syslog( LOG_INFO, "article %s already stored", c );
  36.           continue;    /* for some reasons, article is already there */
  37.       } else if ( errno == ENOENT ) {
  38. !         f = fopen( c, "w" );
  39. !         if ( !f ) {
  40. !         syslog( LOG_ERR, "unable to store article %s: %m", c );
  41.           if ( verbose )
  42. !             printf( "unable to store article %s\n", c );
  43.           continue;
  44.           }
  45.       } else {
  46. --- 835,870 ----
  47.           syslog( LOG_INFO, "article %s already stored", c );
  48.           continue;    /* for some reasons, article is already there */
  49.       } else if ( errno == ENOENT ) {
  50. !         if ( (f = fopen( c, "w" )) == NULL ) {
  51. !                 /* Check if the directory exist */
  52. !                 char * newc = strdup (c);
  53. !                 if ( newc != NULL ) {
  54. !                    char * slp = strrchr (newc, '/');
  55. !                    struct stat ds;
  56. !                    if ( slp != NULL ) {
  57. !                       *slp = '\0';
  58. !                    }
  59. !                    if ( stat (newc, & ds) ) {
  60. !                       if ( mkdir (newc, 0775) < 0 ) {
  61. !                           syslog (LOG_ERR, "Cannot create directory %s: %m"
  62. !                                   , newc);
  63. !                          if ( verbose ) {
  64. !                             printf ("Cannot create directory %s\n", newc);
  65. !                          }
  66. !                       }
  67. !                    }
  68. !                    free (newc);
  69. !                    f = fopen (c, "w"); /* Try opening file again */
  70. !                 }
  71. !             }
  72. !             if ( f == NULL ) {
  73. !         syslog( LOG_ERR, "unable to create article %s: %m", c );
  74.           if ( verbose )
  75. !             printf( "unable to create article %s\n", c );
  76.           continue;
  77.           }
  78.       } else {
  79. ***************
  80. *** 1215,1221 ****
  81.       while ( (de=readdir(d)) ) {
  82.       if ( isalnum( *(de->d_name) ) ) {
  83.           g = findgroup( de->d_name );
  84. !         if ( g ) {
  85.                   g->alive = 1;
  86.           sprintf( s, "%s ", g->name );
  87.           l = havefile ? strstr( stuff, s ) : 0;
  88. --- 1241,1247 ----
  89.       while ( (de=readdir(d)) ) {
  90.       if ( isalnum( *(de->d_name) ) ) {
  91.           g = findgroup( de->d_name );
  92. !         if ( g != NULL ) {
  93.                   g->alive = 1;
  94.           sprintf( s, "%s ", g->name );
  95.           l = havefile ? strstr( stuff, s ) : 0;
  96. ***************
  97. *** 1229,1238 ****
  98.               getmarked( g );
  99.           if ( f != NULL )
  100.                       fprintf( f, "%s %d\n", g->name, newserver );
  101. !             } else {
  102.           printf( "%s not found in groupinfo file\n", g->name );
  103.           syslog( LOG_INFO, "%s not found in groupinfo file", g->name );
  104. !         }
  105.       }
  106.       }
  107.       closedir( d );
  108. --- 1255,1264 ----
  109.               getmarked( g );
  110.           if ( f != NULL )
  111.                       fprintf( f, "%s %d\n", g->name, newserver );
  112. !             } /* If g is NULL, we probably should use it, show we? else {
  113.           printf( "%s not found in groupinfo file\n", g->name );
  114.           syslog( LOG_INFO, "%s not found in groupinfo file", g->name );
  115. !         } */
  116.       }
  117.       }
  118.       closedir( d );
  119. *** ./newsq.c    Sun Feb 14 04:18:33 1999
  120. --- ../leafnode-1.9/./newsq.c    Wed Feb 17 13:28:19 1999
  121. ***************
  122. *** 27,38 ****
  123.       sprintf( s, "%s/out.going", spooldir );
  124.       if ( chdir(s) < 0 ) {
  125.       fprintf( stderr, "Cannot change to %s -- aborting.\n", s );
  126. !     exit;
  127.       }
  128.       d = opendir( "." );
  129.       if ( !d ) {
  130.       fprintf( stderr, "Cannot open directory %s -- aborting.\n", s );
  131. !     exit;
  132.       }
  133.       while ( ( de = readdir(d) ) ) {
  134.       if ( stat( de->d_name, &st ) ) {
  135. --- 27,38 ----
  136.       sprintf( s, "%s/out.going", spooldir );
  137.       if ( chdir(s) < 0 ) {
  138.       fprintf( stderr, "Cannot change to %s -- aborting.\n", s );
  139. !     exit (1);
  140.       }
  141.       d = opendir( "." );
  142.       if ( !d ) {
  143.       fprintf( stderr, "Cannot open directory %s -- aborting.\n", s );
  144. !     exit (1);
  145.       }
  146.       while ( ( de = readdir(d) ) ) {
  147.       if ( stat( de->d_name, &st ) ) {
  148. *** ./leafnode.h    Sun Feb 14 04:18:33 1999
  149. --- ../leafnode-1.9/./leafnode.h    Mon Mar  1 11:49:32 1999
  150. ***************
  151. *** 18,28 ****
  152.   #define PATH_MAX MAXPATHLEN
  153.   #endif
  154.   
  155. ! #ifdef HAVE_CONFIG_H
  156. ! #include <config.h>
  157. ! #endif
  158.   
  159.   #ifdef HAVE_ERRNO_H
  160.   #include <errno.h>
  161.   #include <sys/errno.h>
  162.   #endif
  163. --- 18,28 ----
  164.   #define PATH_MAX MAXPATHLEN
  165.   #endif
  166.   
  167. ! #include "config.h"
  168.   
  169.   #ifdef HAVE_ERRNO_H
  170. + static const int have_errno_h = HAVE_ERRNO_H;
  171.   #include <errno.h>
  172.   #include <sys/errno.h>
  173.   #endif
  174. *** ./checkgroups.c    Sun Feb 14 04:18:33 1999
  175. --- ../leafnode-1.9/./checkgroups.c    Mon Mar  1 11:52:54 1999
  176. ***************
  177. *** 27,34 ****
  178.   #include <sys/resource.h>
  179.   #include <unistd.h>
  180.   
  181. ! const int debug = 0;
  182. ! const int verbose = 0;
  183.   
  184.   #include "leafnode.h"
  185.   
  186. --- 27,34 ----
  187.   #include <sys/resource.h>
  188.   #include <unistd.h>
  189.   
  190. ! int debug = 0;
  191. ! int verbose = 0;
  192.   
  193.   #include "leafnode.h"
  194.   
  195.